package com.ut.demo.slice;

import com.ut.demo.ResourceTable;
import com.ut.demo.adapter.PictureListProvider;
import ohos.aafwk.content.Intent;
import ohos.agp.components.ListContainer;

public class GridListPictureAbilitySlice extends BaseAbilitySlice {

    private ListContainer pictureList;

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_grid_list_picture);
        initView();

    }
    public void initView() {
        pictureList = findComponent(ResourceTable.Id_picture_list);
        pictureList.setItemProvider(new PictureListProvider(this, mImgs));
    }



    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
    private int[] pictures = new int[]{
            ResourceTable.Media_img2,
            ResourceTable.Media_img3};

    private int[] mImgs = new int[]{
            ResourceTable.Media_img8,
            ResourceTable.Media_img2,
            ResourceTable.Media_img3,
            ResourceTable.Media_img8,
            ResourceTable.Media_img18,
            ResourceTable.Media_img5,
            ResourceTable.Media_img7,
            ResourceTable.Media_img8,
            ResourceTable.Media_img9,
            ResourceTable.Media_img11,
            ResourceTable.Media_img13,
            ResourceTable.Media_img14,
            ResourceTable.Media_img16,
            ResourceTable.Media_img18,
            ResourceTable.Media_img19,
            ResourceTable.Media_img20,
            ResourceTable.Media_img21,
            ResourceTable.Media_img22,
            ResourceTable.Media_img23,
            ResourceTable.Media_img24,
            ResourceTable.Media_img25,
            ResourceTable.Media_img26,
            ResourceTable.Media_img5,
            ResourceTable.Media_img7,
            ResourceTable.Media_img8,
            ResourceTable.Media_img9,
            ResourceTable.Media_img11,
            ResourceTable.Media_img13,
            ResourceTable.Media_img14,
            ResourceTable.Media_img18,
    };


}
